1. Field of the Invention
The present invention relates to a method for storing data in a nonvolatile memory.
2. Description of the Related Art
As is known, nonvolatile memories comprise an array of memory cells arranged in rows and columns, in which word lines connect the gate terminals of the memory cells arranged in the same row, and bit lines connect the drain terminals of the memory cells arranged in the same column.
It is also known that in a floating-gate nonvolatile memory cell, storage of a logic state is performed by programming the threshold voltage of the memory cell itself through the definition of the amount of electrical charge stored in the floating-gate region.
According to the information stored, memory cells are distinguished into erased memory cells (logic value stored xe2x80x9c1xe2x80x9d), in the floating-gate regions of which no electrical charge is stored, and written or programmed memory cells (logic value stored xe2x80x9c0xe2x80x9d), in the floating-gate regions of which an electrical charge is stored which is sufficient to cause a sensible increase in the threshold voltage of the memory cells themselves.
The most widespread method for reading nonvolatile memory cells envisages the comparison of a quantity correlated to the current flowing through the memory cell to be read with a similar quantity correlated to the current flowing through a reference memory cell having a known content.
In particular, to perform reading of a memory cell, a read voltage having a value comprised between the threshold voltage of an erased memory cell and the threshold voltage of a written memory cell is supplied to the gate terminal of the memory cell itself, in such a way that, if the memory cell is written, the read voltage is lower than its threshold voltage, and thus no current flows in the memory cell; whereas, if the memory cell is erased, the read voltage is higher than its threshold voltage, and thus current flows in the memory cell.
Furthermore, in flash nonvolatile memories the memory array is generally divided into various sectors consisting of blocks of memory cells, and in these nonvolatile memories it is possible to carry out reading and programming of individual memory cells of one sector and erasure only of all the memory cells of the sector.
Erasure of memory cells of memory matrices is currently performed by applying a negative voltage to the gate terminals of the memory cells, for example xe2x88x9210 V, bringing the substrate and source terminals to a positive voltage, for example +5 V, and leaving the drain terminals floating.
Erasure by sectors requires particular solutions in terms of memory allocation in so far as account must be taken not only of the fact that whenever a datum stored in a sector is modified it is necessary to erase and re-write the entire sector completely, but also of the fact that each sector is provided with a separator device (which, among other things, enables erasure of the sector independently of the other sectors) having large overall dimensions (of the order of a hundred times the height of a array row).
Consequently, the design of a nonvolatile memory normally involves a compromise between the requirement of dividing up the memory blocks as much as possible to perform erasure only of the elements that actually need to be erased, and the requirement of not increasing excessively the area occupied by the nonvolatile memory as a result of the presence of a high number of separator devices. This compromise, however, does not always enable optimal results to be achieved.
An embodiment of the present invention provides a method for storing data in a nonvolatile memory that makes it possible to avoid erasure of a sector whenever one of the memory cells thereof needs to be re-written.
According to an embodiment of the present invention, a method for storing data in a nonvolatile memory is provided, which includes programming first and second memory cells in a differential way, by setting a first threshold voltage in the first memory cell and a second threshold voltage different from the first threshold voltage in the second memory cell, the difference between the threshold voltages of the two memory cells representing a datum stored in the memory cells themselves.
According to another embodiment of the present invention, a method for reading data in a nonvolatile memory is moreover provided, which includes comparing the threshold voltages of the two memory cells and detecting a difference between them. The exact nature of the difference indicates the nature of the datum stored therein.
Finally, according to another embodiment of the present invention, a nonvolatile memory is provided, which includes two cells that are charged differentially to store a datum.